import Child from "./child"

class {
    onCreate() {
        this.state = { display: true };
    }

    toggle() {
        this.state.display = !this.state.display;
    }
}

<div key="root">
    <if(state.display)>
        <${Child}/>
    </if>
</div>